home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Printing / PrintCopyLoop.cp < prev    next >
Text File  |  2000-06-23  |  429b  |  31 lines

  1. // PrintCopyLoop.cp
  2.  
  3. #ifndef PrintCopyLoop_h
  4. #include "PrintCopyLoop.h"
  5. #endif
  6. #ifndef PrintJob_h
  7. #include "PrintJob.h"
  8. #endif
  9.  
  10. PrintCopyLoop::PrintCopyLoop( PrintJob& theJob )
  11.   : batch( theJob ),
  12.      number( 1 ),
  13.      stop( theJob.CopyCount() + 1 )
  14.   {
  15.     if ( Unfinished() )
  16.         batch.Start();
  17.   }
  18.  
  19. void PrintCopyLoop::operator++()
  20.   {
  21.     Assert( Unfinished() );
  22.     
  23.     batch.End();
  24.     
  25.     number++;
  26.     
  27.     if ( Unfinished() )
  28.         batch.Start();
  29.   }
  30.  
  31.